package com.woniuxy.micromallserver.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author unreleased
 * @date 2021/1/29 15:30
 */
@Configuration
public class RabbitMqConfigure {
    /**
     * 扇形交换机
     * @return 实例
     */
    @Bean
    public FanoutExchange fanoutExchange(){
        return new FanoutExchange("fanoutExchange",true,false);
    }
    /**
     * 死信交换机
     * @return 实例
     */
    @Bean
    public DirectExchange deadLetterExchange(){
        return new DirectExchange("deadLetterExchange",true,false);
    }
}
